package com.icu.db;

import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.config.rules.DateType;

public class MyBatisPlusGenerator {

    public static void main(String[] args) {

        FastAutoGenerator.create("jdbc:mysql://127.0.0.1:3306/icu_user", "root", "root")
                .globalConfig(builder -> builder
                        .outputDir("E:\\www\\java\\icu")
                        .fileOverride()
                        .dateType(DateType.ONLY_DATE)

                )
                .packageConfig(builder -> builder
                        .parent("com.icu")
                )
                .strategyConfig(builder -> builder
                        .addInclude("user", "user_shipping_address")
                        .entityBuilder()
                        .enableLombok()
                        .controllerBuilder()
                        .enableRestStyle()
                )
                .execute();
    }

}
